<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/12 0012
 * Time: 下午 4:25
 */
namespace app\article\controller\like;
use app\common\api\AApi;
use app\common\api\like\ILike;

class Api extends AApi implements ILike {
    /**
     * 初始化配置
     * Api constructor.
     * @param array $config
     */
    public function __construct(array $config=[])
    {
        parent::__construct();
    }
    #参数获取
    static public $obj;

    /**
     * 单列实例化参数
     */
    static function getInstance(){
        $data =self::$post_data;
        self::$obj=new Like($data);
        return self::$obj;
    }

    public function l_add(){
        $obj = self::getInstance();
        $res = $obj->l_add();
        return create_callback($res);
    }
    public function l_list()
    {
        $obj = self::getInstance();
        $res = $obj->l_list();
        return create_callback($res);
    }
    public function l_update()
    {
        $obj = self::getInstance();
        $res = $obj->l_update();
        return create_callback($res);
    }
}